Reset User Subscription with Current Group API
POST /resetUserSubscriptionWithCurrentGroup
Description
This API endpoint allows you to reset a user's subscription while retaining their current group assignments. It is used to renew or extend the subscription and update the subscription-related details.
Request Body
The request utilizes GraphQL to perform the resetUserSubscriptionWithCurrentGroup
mutation.
Mutation:
mutation resetUserSubscriptionWithCurrentGroup ($username: String!) {
resetUserSubscriptionWithCurrentGroup (username: $username) {
duration
multiLoginCount
expiresAt
createdAt
updatedAt
dailyBandwidth
downloadUpload
}
}
Variables:
{
"username": "<User_Username>"
}
- username (String): The username of the user whose subscription is to be reset.
Response:
-
Success (200 OK):
- If the reset is successful, the response will include the updated subscription details.
{
"data": {
"resetUserSubscriptionWithCurrentGroup": {
"duration": "<New_Duration>",
"multiLoginCount": "<Updated_Login_Count>",
"expiresAt": "<New_Expiry_Date>",
"createdAt": "<Creation_Date>",
"updatedAt": "<Update_Date>",
"dailyBandwidth": "<Updated_Bandwidth>",
"downloadUpload": "<Updated_Download_Upload_Details>"
}
}
} -
Error (4XX/5XX):
- If there is an issue with the reset process, the response will include an appropriate error message and status code.
Note:
Make sure that the username provided is valid and corresponds to an existing user. This API resets the subscription duration while keeping the user's current group memberships intact, making it suitable for updating subscription details without altering group assignments.